<%@ page import="SeedBank.Seed" %>



<div class="fieldcontain ${hasErrors(bean: seedInstance, field: 'commonName', 'error')} required">
	<label for="commonName">
		<g:message code="seed.commonName.label" default="Common Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="commonName" maxlength="100" pattern="${seedInstance.constraints.commonName.matches}" required="" value="${seedInstance?.commonName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: seedInstance, field: 'scientificName', 'error')} required">
	<label for="scientificName">
		<g:message code="seed.scientificName.label" default="Scientific Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="scientificName" maxlength="100" pattern="${seedInstance.constraints.scientificName.matches}" required="" value="${seedInstance?.scientificName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: seedInstance, field: 'quantity', 'error')} required">
	<label for="quantity">
		<g:message code="seed.quantity.label" default="Quantity" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="quantity" min="1" required="" value="${seedInstance.quantity}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: seedInstance, field: 'hardinessZone', 'error')} required">
	<label for="hardinessZone">
		<g:message code="seed.hardinessZone.label" default="Hardiness Zone" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="hardinessZone" min="1" max="12" required="" value="${seedInstance.hardinessZone}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: seedInstance, field: 'specialRequirements', 'error')} ">
	<label for="specialRequirements">
		<g:message code="seed.specialRequirements.label" default="Special Requirements" />
		
	</label>
	<g:textField name="specialRequirements" maxlength="250" value="${seedInstance?.specialRequirements}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: seedInstance, field: 'harvestingInformation', 'error')} ">
	<label for="harvestingInformation">
		<g:message code="seed.harvestingInformation.label" default="Harvesting Information" />
		
	</label>
	<g:textField name="harvestingInformation" maxlength="250" value="${seedInstance?.harvestingInformation}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: seedInstance, field: 'growingTips', 'error')} ">
	<label for="growingTips">
		<g:message code="seed.growingTips.label" default="Growing Tips" />
		
	</label>
	<g:textField name="growingTips" maxlength="250" value="${seedInstance?.growingTips}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: seedInstance, field: 'startOfGrowingSeason', 'error')} required">
	<label for="startOfGrowingSeason">
		<g:message code="seed.startOfGrowingSeason.label" default="Start Of Growing Season" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="startOfGrowingSeason" precision="day"  value="${seedInstance?.startOfGrowingSeason}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: seedInstance, field: 'endOfGrowingSeason', 'error')} required">
	<label for="endOfGrowingSeason">
		<g:message code="seed.endOfGrowingSeason.label" default="End Of Growing Season" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="endOfGrowingSeason" precision="day"  value="${seedInstance?.endOfGrowingSeason}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: seedInstance, field: 'price', 'error')} required">
	<label for="price">
		<g:message code="seed.price.label" default="Price" />
		<span class="required-indicator">*</span>
	</label>
	<g:field type="number" name="price" step="any" min="0.0" required="" value="${seedInstance.price}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: seedInstance, field: 'user', 'error')} required">
	<label for="user">
		<g:message code="seed.user.label" default="User" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="user" name="user.id" from="${[session?.user]}" optionKey="id" required="" value="${session?.user?.id}" class="many-to-one"/>
</div>

